<div class="presentations view">
<h2><?php  echo __('Entrega'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($presentation['Presentation']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Fecha inicio'); ?></dt>
		<dd>
			<?php echo h($presentation['Presentation']['startdate']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Fecha de término'); ?></dt>
		<dd>
			<?php echo h($presentation['Presentation']['enddate']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Tipo de Entrega'); ?></dt>
		<dd>
			<?php echo __($presentation['PresentationType']['name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Nombre'); ?></dt>
		<dd>
			<?php echo h($presentation['Presentation']['name']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<?php if($this->Session->read('Auth.User.role_id')=='1'): ?>
<div class="actions">
	<h3><?php echo __('Acciones'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Editar Entrega'), array('action' => 'edit', $presentation['Presentation']['id'])); ?> </li>
		<!--li><?php echo $this->Form->postLink(__('Eliminar entrega'), array('action' => 'delete', $presentation['Presentation']['id']), null, __('Esta seguro que desea eliminar la entrega # %s?', $presentation['Presentation']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Lista de presentaciones'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Nueva presentación'), array('action' => 'add')); ?> </li-->
		<li><?php echo $this->Html->link(__('Lista de tipos de entregas'), array('controller' => 'presentation_types', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Nuevo tipo de entrega'), array('controller' => 'presentation_types', 'action' => 'add')); ?> </li>
		<!--li><?php echo $this->Html->link(__('Lista de avances'), array('controller' => 'previews', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Nuevo avance'), array('controller' => 'previews', 'action' => 'add')); ?> </li-->
	</ul>
</div>
<?php endif; ?>
<div class="related">
	<h3><?php echo __('Avances Entregados'); ?></h3>
	<?php if (!empty($presentation['Preview'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Nombre'); ?></th>
		<th><?php echo __('Descripción'); ?></th>
		<th><?php echo __('Link Vídeo'); ?></th>
		<th><?php echo __('id Presentación'); ?></th>
		<th><?php echo __('id Subida'); ?></th>
		<th class="actions"><?php echo __('Acciones'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($presentation['Preview'] as $preview): ?>
		<tr>
			<td><?php echo $preview['id']; ?></td>
			<td><?php echo $preview['name']; ?></td>
			<td><?php echo $preview['description']; ?></td>
			<td><?php echo $preview['route']; ?></td>
			<td><?php echo $preview['presentation_id']; ?></td>
			<td><?php echo $preview['upload_id']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Ver'), array('controller' => 'previews', 'action' => 'view', $preview['id'])); ?>
				<?php if($this->Session->read('Auth.User.role_id')=='1'): ?>				
				<?php echo $this->Html->link(__('Editar'), array('controller' => 'previews', 'action' => 'edit', $preview['id'])); ?>
				<?php echo $this->Form->postLink(__('Eliminar'), array('controller' => 'previews', 'action' => 'delete', $preview['id']."|".$preview['upload_id']), null, __('Are you sure you want to delete # %s?', $preview['id'])); ?><?php endif; ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>


</div>
